1. Field of the Invention
The present invention relates to the design of platform-independent virtual machines for smaller computing devices. More specifically, the present invention relates to a method and an apparatus for loading class files into non-volatile memory.
2. Related Art
Dramatic advances in computer technology presently make it possible to integrate a significant amount of computing power onto “smart cards.” Smart cards are presently used in a variety of applications that solve common security and identity needs. For example, smart cards have been integrated into credit cards, debit cards, corporate badges, and even cell phones.
New smart card designs can accommodate larger amounts of memory. For example, new smart card designs can accommodate up to 160 K bytes of read-only memory (ROM), 64 K bytes of electrically erasable programmable read-only memory (EEPROM), and 8 K bytes of random access memory (RAM). These larger amounts of memory make it possible to integrate more functionality into a smart card.
In particular, the additional memory can be used to implement a virtual machine, such as the JAVA™ virtual machine (JVM), in a smart card, and to allow the use of objects defined within an object-oriented programming system. (JAVA is a trademark of SUN Microsystems, Inc. of Santa Clara, Calif.) Integrating a virtual machine into a smart card enables the smart card to execute a large number of platform-independent applications. Moreover, the associated development environment for the virtual machine can simplify the process of developing applications for smart cards.
While it is possible to implement a virtual machine on one of these smart cards, the memory is still quite limited compared to a typical desktop computer system. This limited memory leads to many challenges in the implementing a virtual machine.
One problem is that there is very little space in RAM for executing platform-independent applications. When a larger computer system receives a platform-independent application, the platform-independent application is typically loaded into RAM before the associated methods are executed. However, because there is an extremely small amount of RAM in a smart card (about 8 K), it is often impossible or impractical to load an entire platform-independent application into RAM prior to execution.
In theory it is possible to execute a platform-independent application in non-volatile memory. However, the platform-independent application must first be translated from its received form, typically a Java ARchive (JAR) file or a Converted APplet (CAP) file, into a representation suitable for execution. During this translation process, a number of operations are performed, such as resolving symbolic references and verifying bytecodes. Unfortunately, existing techniques for performing this translation are not suited for computing devices with small amounts of RAM, such as smart cards.
Hence, what is needed is a method and an apparatus for efficiently loading platform-independent applications into non-volatile memory.